<template>
    <table border="1" align="center">
      <tr><td>id</td><td>姓名</td></tr>
      <tr v-for="(user,index) in users" :key="index"><td>{{user.id}}</td><td>{{user.name}}</td></tr>
    </table>
</template>

<script>
    export default {
        name: "baizhi",
      data(){
          return {users:[]}
      },
      created(){
        this.axios.get("/user/selectAll.do").then(resp=>{
          let data = resp.data;
          this.users=data;
          console.log(data)
        })
      }
    }
</script>

<style scoped>

</style>
